Skip to content

Conversation

@C0C0B01
Copy link

@C0C0B01 C0C0B01 commented Jul 28, 2025

This adds some plugins from lumi to wintry

Copy link
Owner

@amsryq amsryq left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the PR.

I might not accept Dashless plugin due to its patching approach (refer to the comments). If you don't feel like reworking on it, you can exclude this plugin from this PR and only leave AlwaysTrust

Please test your PR and run the linter if possible

@@ -0,0 +1,19 @@
import { Dev } from "@data/constants";
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

shouldn't this be Devs?

export default definePlugin({
name: "Always Trust",
description: "Prevents Discord's trust website confirmations",
authors: [Dev.cocobo1],
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cocobo1 is not defined in in Devs

import { byStoreName } from "@metro/common/stores";

export default definePlugin({
name: "Always Trust",
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wintry's plugin name must be PascalCase

Comment on lines 33 to 36
{
"name": "Awesomegamergame",
"id": 504401951623086081n
}],
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This person is not a direct contributor to Wintry. Please credit them only at the codebase level.

If you're submitting this plugin on their behalf (they are the original author and intend to contribute to Wintry), include their identity in the Devs constant. Also, remove your name if you had no part in its development.

Comment on lines 38 to 40
unpatchRender = after(View, "render", (_, res) => {
return traverseAndModify(res);
});
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there no better approach than patching the View? This introduces performance overhead (especially for a simple plugin) and should be avoided

return node;
};

let unpatchRender: () => void;
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wintry provides a scoped patcher. Use it instead to ensure automatic unpatching during the plugin cleanup cycle:

import { patcher } from "#plugin-context";


const { View } = ReactNative;

const traverseAndModify = (node: any): any => {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wouldn't this replace every string node instead of only "changing dashes in text channel names to spaces"?

@C0C0B01
Copy link
Author

C0C0B01 commented Jul 29, 2025

oh yeah i just realised I need to change a few things from lumi to make it work 😅. I kinda just rushed this pr and slammed the plugins into it, ill review your changes and fix them later today

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants